<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <script type="text/javascript" src="./script/rem.js"></script>
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta content="yes" name="apple-mobile-web-app-capable">
    <meta content="yes" name="apple-touch-fullscreen">
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <link rel="stylesheet" type="text/css" href="./css/font-awesome.css" />
    <link rel="stylesheet" type="text/css" href="./css/style.css" />
    <script type="text/javascript" src="./script/jquery.min.js"></script>
</head>
<body>

    <header class="head" style="padding-top:0.4rem;">
        <div class="head-l" tapmode onclick="closeWin()"><i class="fa fa-angle-left"></i></div>
        <h3>注册</h3>
        <div class="head-r"></div>
    </header>
    <div class="head-d" style="padding-top:0.4rem;"></div>

    <ul class="list-input mt20">
        <li>
            <label>邀请码:</label>
            <input type="text" placeholder="请输入邀请码" id="invite_code">
        </li>
    </ul>
    <div style="display:flex; overflow:hiden;" class="mt60 mb60">
        <div class="btn-1" tapmode onclick="register_2(1)" style="width:calc(50% - 0.8rem;); margin:0 0.4rem">下一步</div>
        <div class="btn-1" tapmode onclick="register_2(2)" style="width:calc(50% - 0.8rem;); margin:0 0.4rem">略过</div>
    </div>

<!--     <div class="register-d">
        点击下一步代表同意
        <p onclick="userAgreement();">《用户协议》</p>
    </div> -->

</body>
<script type="text/javascript" src="./script/api.js"></script>
<script type="text/javascript" src="./script/index.js"></script>
<script type="text/javascript">

    function register_2(is_code) {

        var invite_code = '';
        if (is_code == 1) {
            invite_code = $api.byId('invite_code').value;
            if (!invite_code) {
                api.toast({
                    msg: '请填写邀请码!',
                    duration: 2000,
                    location: 'bottom'
                });
                return false;
            }
        }
        api.openWin({
            name: 'register_2',
            url: './register_2.html',
            pageParam: {
                invite_code: invite_code,
            }
        });
    }

    // 打开用户协议
    function userAgreement(){
        // 跳转网页
        api.openWin({
            name: 'web_view',
            url: './web_view.html',
            pageParam: {
                url: 'http://yipinyizhuan.com/api/wap/html?key=user_license',
                title: '用户协议',
            }
        });
    }

    function closeWin(){
        api.closeWin({
        });
    }
</script>
</html>